package kr.hkit.powerjava.chapter26;

import java.util.Properties;

import kr.hkit.powerjava.chapter26.commm.DbUtil;

public class TestMain {
	public static void main(String[] args) {
		String driver = "com.mysql.jdbc.Driver";
		String url = "jdbc:mysql://localhost:3306/mysql_study";
		String user = "root";
		String password = "1111";
		
		DbUtil.savePropertis("dbcon.xml", driver, url, user, password);
		
		
		Properties prop = DbUtil.loadPropertis("dbcon.xml");
		
		System.out.println(prop.getProperty("DRIVER"));
		System.out.println(prop.getProperty("URL"));
		System.out.println(prop.getProperty("USER"));
		System.out.println(prop.getProperty("PASSWORD"));
	}
}
